The accelerators usually involve the ctrl key in combination with a 
function key or 
a letter key (for example, shortcut keys -s to save a file)
.These keyboard accelerators are defined in a prorgrams resours script along
 with a programs menu. dialog boxes also have a keyboard interface ,
but programs usuallly dont need to monitor the keyboard when a dialog box 
is active .the keyboard interface is handle by windows &windows 
sends messages to our program about the effects of the keystrokes .As we
 know call, theb msg structure thatr a program uses to retrieve
 messages from the message queue includes a hwnd fields.
This field indicates the handle of the window that is to receive the message.
 The dispatch message fuction in the message loop sends the 
message to  the window procedure associated with the window for which 
for which the message is intended.
When a key on the keyboard is pressed only one window procedure recieves a 
keyboard message & this message includesa handle to the 
window that is to recieve the message .
The active window is usually easy to identify it is always a top level window is 
currently minimize window highligth its entry in the taskbar
 by showing it as a depressed button if the active window has child windows the windopws with the input focus can be either the active window
 or one of its descendants. 